<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.io.*,java.io.FileReader,java.util.*,igeekgroup2.domain.*"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%-- <%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"
	import="java.io.BufferedReader,java.io.FileReader,java.util.*,igeekgroup2.domain.*,"%> --%>

<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src="js/jquery-1.11.0.js"
	type="text/javascript" charset="utf-8"></script>
<style>
a{text-decoration:none;}
a:hover {color: red; text-decoration:none;}

#img {
	width: 60px;
	height: 60px;
	border-radius: 50%;
}

.divForm {
	position: relative;
	width: 800px;	
	/* border: 1px solid blue; */
	text-align: center;
	top: 50%;
	left: 50%;
	margin-top: 40px;
	margin-left: -400px;
}

#url {
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}
</style>
</head>
<body  background="mainPageImg/mainBackground.png"
	style="background-repeat: no-repeat; background-size: 100% 100%; background-attachment: fixed;">
	<h1>
		<center>人人博客</center>
	</h1>



	<table width="100%" height="100px" border="1px solid red" style = "text-align:center">
		<tr>
			
			</td>
			<td><input type="hidden" id="touxiang" name="" value="">
				<!-- 头像 -->
				<a href=""><img alt=""
					src="mainPageImg/head.jpg" id="img"></a>
			</td>
		
			<td><a href="login.jsp"><font ><b>&nbsp;&nbsp;&nbsp;登录&nbsp;&nbsp;&nbsp;</b></font></a>
				<a href="Cregister.jsp"><font ><b>&nbsp;&nbsp;&nbsp;注册&nbsp;&nbsp;&nbsp;</b></font></a>
                <a href="CollectData"><font ><b>&nbsp;&nbsp;&nbsp;我的主页${uname}&nbsp;&nbsp;&nbsp;</b></font></a></td>
			
			<td>当前在线人数：???${onlineNum } <a href="logout.jsp">注销</a>
			</td>
		</tr>
	</table>

	<div class="divForm">
		<form action="main" method="post" id="frm">

			<input type="hidden" id="hidPageNum" name="pageNum"
				value="${pageNum }" />
			<input type="hidden"  name="uname"
				value="${uname }" />
	
			<c:forEach items="${map }" var="map1">
				<p align="left">
					<a href="article?pid=${map1.key.pid }&uname=${map1.key.uname}"
						id="id1"><font size="5">${map1.key.title }</font></a>
				</p>

				<p align="left" id="url">&nbsp;&nbsp;${map1.value }</p>

				<br />
			</c:forEach>
				
		
			<div>
				<c:forEach items="${page.bar }" var="i">
					<a class="btnSubmit" href="javascript:void(0);"
						style="color: red;">${i }</a>
				</c:forEach>
				<p style="color: red;">共有${page.total }条记录</p>
			</div>
	
		</form>
		 
	</div>
	           


         
	<script type="text/javascript">
		 //给btnSubmit加单击事件：让hidPageNum的value与btnSubmit的value一样
		$(".btnSubmit").click(function() {
			$("#hidPageNum").val($(this).html());
			//分页点击的时候提价表单
			$("#frm").submit();
		});
	</script> 
</body>
</html>